.class Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;
.super Landroid/os/AsyncTask;
.source "ImageSwitcherActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/activity/ImageSwitcherActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "SaveBitmapTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/String;",
        "Ljava/lang/Integer;",
        "Ljava/lang/String;",
        ">;"
    }
.end annotation


# instance fields
.field private final drawableReference:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference",
            "<",
            "Landroid/graphics/drawable/Drawable;",
            ">;"
        }
    .end annotation
.end field

.field private final filename:Ljava/lang/String;

.field final synthetic this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;


# direct methods
.method public constructor <init>(Lcom/netease/newsreader/activity/ImageSwitcherActivity;Landroid/graphics/drawable/Drawable;Ljava/lang/String;)V
    .locals 1
    .parameter
    .parameter "drawable"
    .parameter "name"

    .prologue
    .line 2786
    iput-object p1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    .line 2783
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 2784
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p2}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->drawableReference:Ljava/lang/ref/WeakReference;

    .line 2785
    iput-object p3, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->filename:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->doInBackground([Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected varargs doInBackground([Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .parameter "arg0"

    .prologue
    .line 2791
    iget-object v2, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->drawableReference:Ljava/lang/ref/WeakReference;

    if-eqz v2, :cond_0

    .line 2792
    iget-object v2, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->drawableReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/graphics/drawable/BitmapDrawable;

    .line 2793
    .local v0, bd:Landroid/graphics/drawable/BitmapDrawable;
    if-eqz v0, :cond_0

    .line 2794
    invoke-virtual {v0}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v1

    .line 2795
    .local v1, mBitmap:Landroid/graphics/Bitmap;
    iget-object v2, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->filename:Ljava/lang/String;

    invoke-static {v2, v1}, Lcom/netease/newsreader/util/PicUtil;->saveMyBitmap(Ljava/lang/String;Landroid/graphics/Bitmap;)Z

    .line 2801
    .end local v0           #bd:Landroid/graphics/drawable/BitmapDrawable;
    .end local v1           #mBitmap:Landroid/graphics/Bitmap;
    :cond_0
    const/4 v2, 0x0

    return-object v2
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->onPostExecute(Ljava/lang/String;)V

    return-void
.end method

.method protected onPostExecute(Ljava/lang/String;)V
    .locals 2
    .parameter "result"

    .prologue
    .line 2807
    invoke-super {p0, p1}, Landroid/os/AsyncTask;->onPostExecute(Ljava/lang/Object;)V

    .line 2808
    iget-object v0, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    iget-object v0, v0, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->photolist:Ljava/util/List;

    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$SaveBitmapTask;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    iget v1, v1, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->g_position:I

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/bean/PhotoInfo;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/bean/PhotoInfo;->setMydrawable(Landroid/graphics/drawable/Drawable;)V

    .line 2809
    return-void
.end method
